import './index.less'
import React from 'react'
import { useT } from '@designable/event-system'
/**
 * title 标题
 */

type LabelTitleProps = {
  title: string
  extra?: string
  style?: any
}

export function LabelTitle(props: LabelTitleProps) {
  const { title, extra, style } = props
  const $t = useT()
  return (
    <div className="dpLabelTitle" style={style}>
      <div className="dpRectangle" />
      <div className="dpLabelText">
        {$t(title)}
        {extra && <div className="dpExtra">{$t(extra)}</div>}
      </div>
    </div>
  )
}
